Integrand size = 31, antiderivative size = 70 \[ \int \frac {\cos ^4(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=\frac {i \cos ^5(c+d x)}{5 a d}+\frac {\sin (c+d x)}{a d}-\frac {2 \sin ^3(c+d x)}{3 a d}+\frac {\sin ^5(c+d x)}{5 a d} \]
[Out]
Time = 0.14 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {3171, 3169, 2713, 2645, 30} \[ \int \frac {\cos ^4(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=\frac {\sin ^5(c+d x)}{5 a d}-\frac {2 \sin ^3(c+d x)}{3 a d}+\frac {\sin (c+d x)}{a d}+\frac {i \cos ^5(c+d x)}{5 a d} \]
[In]
[Out]
Rule 30
Rule 2645
Rule 2713
Rule 3169
Rule 3171
Rubi steps \begin{align*} \text {integral}& = -\frac {i \int \cos ^4(c+d x) (i a \cos (c+d x)+a \sin (c+d x)) \, dx}{a^2} \\ & = -\frac {i \int \left (i a \cos ^5(c+d x)+a \cos ^4(c+d x) \sin (c+d x)\right ) \, dx}{a^2} \\ & = -\frac {i \int \cos ^4(c+d x) \sin (c+d x) \, dx}{a}+\frac {\int \cos ^5(c+d x) \, dx}{a} \\ & = \frac {i \text {Subst}\left (\int x^4 \, dx,x,\cos (c+d x)\right )}{a d}-\frac {\text {Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,-\sin (c+d x)\right )}{a d} \\ & = \frac {i \cos ^5(c+d x)}{5 a d}+\frac {\sin (c+d x)}{a d}-\frac {2 \sin ^3(c+d x)}{3 a d}+\frac {\sin ^5(c+d x)}{5 a d} \\ \end{align*}
Time = 0.77 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.59 \[ \int \frac {\cos ^4(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=\frac {i \cos (c+d x)}{8 a d}+\frac {i \cos (3 (c+d x))}{16 a d}+\frac {i \cos (5 (c+d x))}{80 a d}+\frac {5 \sin (c+d x)}{8 a d}+\frac {5 \sin (3 (c+d x))}{48 a d}+\frac {\sin (5 (c+d x))}{80 a d} \]
[In]
[Out]
Time = 0.96 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.20
method | result | size |
risch | \(\frac {i {\mathrm e}^{-5 i \left (d x +c \right )}}{80 a d}+\frac {i \cos \left (d x +c \right )}{8 a d}+\frac {5 \sin \left (d x +c \right )}{8 a d}+\frac {i \cos \left (3 d x +3 c \right )}{16 a d}+\frac {5 \sin \left (3 d x +3 c \right )}{48 a d}\) | \(84\) |
derivativedivides | \(\frac {-\frac {i}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{2}}-\frac {1}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{3}}+\frac {5}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}-\frac {i}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{4}}+\frac {3 i}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{2}}+\frac {2}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{5}}-\frac {5}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{3}}+\frac {11}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )}}{a d}\) | \(141\) |
default | \(\frac {-\frac {i}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{2}}-\frac {1}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{3}}+\frac {5}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}-\frac {i}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{4}}+\frac {3 i}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{2}}+\frac {2}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{5}}-\frac {5}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{3}}+\frac {11}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )}}{a d}\) | \(141\) |
parallelrisch | \(\frac {\frac {2 i}{5}+\frac {6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{5}-\frac {26 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{15}-\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{3}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}+2 i \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\frac {10 i \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{3}+\frac {14 i \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{5}}{a \left (2 i \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3} d}\) | \(148\) |
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.90 \[ \int \frac {\cos ^4(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=\frac {{\left (-5 i \, e^{\left (8 i \, d x + 8 i \, c\right )} - 60 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 90 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 20 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 3 i\right )} e^{\left (-5 i \, d x - 5 i \, c\right )}}{240 \, a d} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 196 vs. \(2 (53) = 106\).
Time = 0.25 (sec) , antiderivative size = 196, normalized size of antiderivative = 2.80 \[ \int \frac {\cos ^4(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=\begin {cases} \frac {\left (- 30720 i a^{4} d^{4} e^{12 i c} e^{3 i d x} - 368640 i a^{4} d^{4} e^{10 i c} e^{i d x} + 552960 i a^{4} d^{4} e^{8 i c} e^{- i d x} + 122880 i a^{4} d^{4} e^{6 i c} e^{- 3 i d x} + 18432 i a^{4} d^{4} e^{4 i c} e^{- 5 i d x}\right ) e^{- 9 i c}}{1474560 a^{5} d^{5}} & \text {for}\: a^{5} d^{5} e^{9 i c} \neq 0 \\\frac {x \left (e^{8 i c} + 4 e^{6 i c} + 6 e^{4 i c} + 4 e^{2 i c} + 1\right ) e^{- 5 i c}}{16 a} & \text {otherwise} \end {cases} \]
[In]
[Out]
Exception generated. \[ \int \frac {\cos ^4(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=\text {Exception raised: RuntimeError} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.70 \[ \int \frac {\cos ^4(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=\frac {\frac {5 \, {\left (15 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 24 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 13\right )}}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right )}^{3}} + \frac {165 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 480 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 650 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 400 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 113}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}^{5}}}{120 \, d} \]
[In]
[Out]
Time = 24.95 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.91 \[ \int \frac {\cos ^4(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=-\frac {\left (-15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,15{}\mathrm {i}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,25{}\mathrm {i}-13\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,21{}\mathrm {i}+9\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+3{}\mathrm {i}\right )\,2{}\mathrm {i}}{15\,a\,d\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )}^3\,{\left (1+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}\right )}^5} \]
[In]
[Out]